home *** CD-ROM | disk | FTP | other *** search
/ Softwarová Záchrana 3 / Softwarova-zachrana-3.bin / Xteq X-Setup / xqdcXSP-Setup-EN.exe / {app} / plugins / XQ IE Clear History Folder.xpl.bak < prev    next >
Text File  |  2001-04-13  |  3KB  |  99 lines

  1. "FILE"="Xteq Systems X-Setup Plugin 6.0"
  2. "TYPE"="5"
  3. "COUNT"="2"
  4. "UIPATH"="Internet\Internet Explorer\Clear"
  5. "NAME"="Clear History"
  6. "VERSION"="1.11"
  7. "-WARNING"="1"
  8. "LANGUAGE"="VBScript"
  9. "TEXT 1"="Clear IE History Folder"
  10. "TEXT 2"="Clear IE History Folder (Security Wipe!)"
  11. "DESCRIPTION 1"="This plug-in will totally erase any files in your Internet Explorer 'History' folder."
  12. "DESCRIPTION 2"="If you apply the second option, every file found (except any subfolders, or a file named index.dat) will be filled with garbage before deleting so even an undelete does not show what was inside the files."
  13. "DESCRIPTION 3"="These options will not work if you have your History folder set in the registry using a variable, such as %USERPROFILE%\Local Settings\History [the %userprofile% is the variable.  Anything between two percent signs (example: %anything% ) is a variable].
  14. "DESCRIPTION 4"="To enable these options to work, you must manually specify a History folder.  There is a plug-in included with X-Setup which will allow you to set a folder path for the IE History location."
  15. "AUTHOR"="Xteq Systems (CptSiskoX)"
  16. "CONTACTURL"="http://www.xteq.com"
  17. "COPYRIGHT"="Copyright ⌐ Xteq Systems - All Rights Reserved"
  18. "COMMENT 1"=" "
  19.  
  20.  
  21. sP="HKCU\Software\Microsoft\Windows\CurrentVersion\Explorer\Shell Folders\History"
  22.  
  23. Sub Plugin_Initialize 
  24. End Sub
  25.  
  26. Sub Plugin_CheckData(ElementIndex)
  27. End Sub
  28.  
  29. Sub Plugin_Apply(ElementIndex,ElementSubIndex)
  30.  if ElementIndex=1 then 
  31.     Call DoWork(false)  
  32.  else
  33.     Call DoWork(true)
  34.  end if
  35.  
  36.  
  37.  
  38.  
  39. End Sub
  40.  
  41. Sub DoWork(EraseTotally)
  42.     s=RegReadValue(sP)
  43.     sBasePath=s
  44.  
  45.     if folderexists(sBasePath) then
  46.        'okay, now look for any remaing files...
  47.        Call KillDir(sBasePath,EraseTotally,false)
  48.                    
  49.        'done!
  50.        msginformation "History Folder contents cleared!"
  51.     else
  52.        msgerror "Unable to locate History folder - nothing done!"
  53.     end if
  54. end Sub
  55.  
  56.  
  57. Sub KillDir(DirName,EraseTotally,KillDirAlso)
  58.  
  59.  iC=FileEnum(DirName & "\*.*")
  60.  
  61.  for i=1 to iC 
  62.      sFile=FileEnumElement(i)
  63.      'index.dat can not be erased, always locked for writing... grr..
  64.      if right(sFile,9)<>"index.dat" then
  65.    
  66.         if EraseTotally then
  67.            lC=TxtOpen(sFile)
  68.  
  69.            'replace contents of file    
  70.            for l=1 to lC 
  71.                Call TxtSetLine(l,"-")
  72.            next
  73.          
  74.            'desktop.ini is special case..
  75.            if right(sFile,11)="desktop.ini" then
  76.               Call FileSetAttribute(sFile,"R-")
  77.               Call FileSetAttribute(sFile,"H-")
  78.               Call FileSetAttribute(sFile,"S-")
  79.            end if
  80.  
  81.           Call TxtSave()
  82.         end if
  83.  
  84.         'now kill the file
  85.         FileDelete(sFile)
  86.      end if               
  87.  
  88.  next 
  89.  
  90.  if KillDirAlso=true then
  91.     FolderDelete(DirName)
  92.  end if
  93. End Sub
  94.  
  95.  
  96. Sub Plugin_Terminate 
  97. End Sub
  98.  
  99.